< previous page page_287 next page >

Page 287
0287-01.jpg
Figure 12.36
Calling the 
Play method causes
the video to play repeatedly.
tip.gif
Create a form that you can use in all your Visual Basic projects to display status information. The form could include an Animation control and progress bar. You can set the Animation control's AutoPlay property to True to start the video automatically, without executing the Play method.

Optional Parameters of the Play Method
The default behavior of the Animation control is to "loop" the video playback. In other words, the animation is played over and over from start to finish until the Stop method executes. The following three optional parameters to the Play method allow you to change this behavior, however:
RepeatSpecifies the number of times to play the video segment.
StartSpecifies the frame where playback should begin.
StopSpecifies the frame where playback should end. You can use the Windows Media Player (MPLAYER.EXE) to find frame numbers.
These optional parameters are used in the following line of code, which repeats frames 5 through 15 of an animation two times:
anmAviPlayer.Play 2, 5, 15
You can specify any or all the optional parameters. Any parameters that are omitted use their default values. The parameters must be specified in the order Repeat, Start, and Stop. If you omit one of the earlier parameters, you must use a comma as a placeholder.
From Here . . .
This chapter introduced you to the group of controls known as the Windows Common controls. Several of the controls covered here are new to Visual Basic 6.0. You can use these controls to enhance your projects in many ways. The best way to learn about them is to test them in your programs. To find out more about related topics, see the following chapters:
If you have not yet studied the controls that are available in your toolbox by default, see Chapter 4, "Using Visual Basic's Default Controls."
To learn about using the Toolbar control (which was not covered in this chapter) and creating menus, see Chapter 6, "Giving More Control to the User: Menus and Toolbars."
For a discussion of using controls in an array, see Chapter 13, "Working with Control Arrays."

 
< previous page page_287 next page >